package me.may.money.command.subcommand;

import org.bukkit.command.CommandSender;

import me.may.money.Entry;
import me.may.money.util.SubCommand;

public class ReloadCommand implements SubCommand {

	@Override
	public boolean execute(CommandSender sender, String[] args) {
		if(args.length != 1) {
			sender.sendMessage("§8[§6交子§8] §e>> §c参数不正确");
			return true;
		}
		if(!sender.isOp()) {
			sender.sendMessage("§8[§6交子§8] §e>> §c权限不足");
			return true;
		}
		Entry.getInstance().reloadConfig();
		sender.sendMessage("§8[§6交子§8] §e>> §7配置文件已重载");
		return false;
	}
}
